﻿<%@ Page Language="C#" AutoEventWireup="true" Codebehind="consumedit.aspx.cs" Inherits="LabMS.Web.Equipment.Consum.consumedit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>耗材修改</title>
    <link type="text/css" rel="stylesheet" href="../../style/screen.css" />
    <!--[if lte IE 6]>
    <link type="text/css" rel="stylesheet" href="../../style/ie6.css" />
    <![endif]-->
    <!--[if lte IE 7]>
    <link type="text/css" rel="stylesheet" href="../../style/ie7.css" />
    <![endif]-->

    <script src="../../js/calendar5.js" type="text/javascript"></script>

    <script type="text/javascript" src="../../js/Common.js"></script>

    <script type="text/javascript">
         var c = new Calendar("c");
        document.write(c);
    </script>

</head>
<body class="mainBody">
    <form id="form1" runat="server">
        <div class="main">
            <div id="pageInfo" class="clearfix">
                <div class="title">
                    <label>
                        <a href="consumlist.aspx">耗材一览</a></label>&gt;修改耗材信息
                </div>
            </div>
        </div>
        <div class="main">
            <p>
                <asp:Button ID="lbSave" CssClass="button" runat="server" OnClick="lbSave_Click" Text="保存" />
                <input id="lbCancel" type="button" class="button" onclick="RedirectURL(window, 'consumlist.aspx')"
                    value="返回" />
            </p>
            <table border="0" cellpadding="4" cellspacing="0">
                <tr>
                    <td>
                        <label class="itemTitle">
                            耗材编号:</label><span style="color: #ff0000">*</span>
                    </td>
                    <td>
                        <asp:TextBox Enabled="false" ID="tbCNub" runat="server" MaxLength="10"></asp:TextBox>
                    </td>
                    <td rowspan="6" colspan="2" align="left">
                        <asp:Image AlternateText="" ID="EquipPhoto" runat="server" Width="100" Height="120" />
                        <br />
                        <asp:FileUpload ID="imageUpload" runat="server" Width="100" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            耗材类别:</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlCClass" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            耗材名称:</label><span style="color: #ff0000">*</span>
                    </td>
                    <td>
                        <asp:TextBox ID="tbCName" runat="server" MaxLength="20"></asp:TextBox>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            分类号码:</label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbClassNub" runat="server" MaxLength="20"></asp:TextBox>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            型&nbsp; &nbsp; 号:</label><span style="color: #ff0000">*</span>
                    </td>
                    <td>
                        <asp:TextBox ID="tbTypeNub" runat="server" MaxLength="40"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            入库位置:</label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbLocation" runat="server" MaxLength="40"></asp:TextBox>
                        <input id="btnWindowsLcoation" onclick="OpenEditWinOther('../Common/Location.aspx',600,400)"
                            type="button" value="..." class="button" />     
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            生产国别:</label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbCountry" runat="server" MaxLength="40"></asp:TextBox>
                        <input id="btCountryselect" name="btCountryselect" onclick="OpenEditWin('../Dictionary.aspx?Type=guobie',500,400)"
                            type="button" value="..." class="button" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            数&nbsp;&nbsp;量:</label><span style="color: #ff0000">*</span>
                    </td>
                    <td>
                        <asp:TextBox ID="tbNub" runat="server" Text="1"></asp:TextBox>
                    </td>
                    <td>
                        <label class="itemTitle">
                            出厂编号:</label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbFNub" MaxLength="30" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            单&nbsp;&nbsp;价:</label><span style="color: #ff0000">*</span>
                    </td>
                    <td>
                        <asp:TextBox ID="tbPrice" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        <label class="itemTitle">
                            单 据 号:</label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbDocuments" MaxLength="16" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            单&nbsp;&nbsp;位:</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlModle" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td>
                        <label class="itemTitle">
                            购置日期</label><span style="color: #ff0000">*</span>
                    </td>
                    <td>
                        <asp:TextBox ID="tbBuyDate" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            来&nbsp;&nbsp;源:</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlComeFrom" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td>
                        <label class="itemTitle">
                            出厂日期:</label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbProduceDate" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            使用方向:</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlArrow" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td>
                        <label class="itemTitle">
                            创建日期:</label>
                    </td>
                    <td>
                        <asp:Label ID="labelCreatDate" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            经费科目:</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlFundsSubject" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td>
                        <label class="itemTitle">
                            供 应 商:</label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbVENDOR" runat="server" MaxLength="180"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            用途:</label></td>
                    <td colspan="3">
                        <asp:TextBox ID="tbPurpose" runat="server" TextMode="MultiLine" Width="440" Height="85"></asp:TextBox></td>
                </tr>
            </table>
        </div>
        <input id="LabID" runat="server" style="display: none" type="text" />
        <asp:Label ID="lbErr" runat="server" ForeColor="Red" Text="Err" Visible="False"></asp:Label>
        <asp:TextBox ID="tbStateCode" runat="server"></asp:TextBox>
        <div style="display: none">
            <asp:TextBox ID="tbLocationCode" runat="server"></asp:TextBox>
        </div> 
        <script type="text/javascript" src="../../js/jQuery/jquery-1.3.1.js"></script>

        <script type="text/javascript" src="../../js/jQuery/jquery.validate.js"></script>

        <script type="text/javascript">
          function OpenEditWinOther(frmWin,width,height) 
          {       
               var me; 
               me = window;  
               var ret = window.showModalDialog(frmWin,me,'dialogWidth='+width +'px;dialogHeight='+height+'px;help:no;status:no');
                  if (ret != null) 
                {
                    document.getElementById("tbLocation").value = ret[1];
                    document.getElementById("tbLocationCode").value = ret[0];
                }  
          } 
      function OpenEditWin(frmWin,width,height) 
      {       
           var me; 
           me = window;  
           var ret = window.showModalDialog(frmWin,me,'dialogWidth='+width +'px;dialogHeight='+height+'px;help:no;status:no');
              if (ret != null) 
            { 
                document.getElementById("tbStateCode").value = ret[0];
                document.getElementById("tbCountry").value = ret[1];
            }  
      }
      
      $(document).ready(function(){
            $("#form1").validate({
                rules: {
                    imageUpload:{
                        accept:'jpg|bmp|png|gif'
                    }
                },
                messages: {
                    imageUpload:{
                        accept:"请输入正确格式的图片"
                    }
                }
            });
        });
        </script>

    </form>
</body>
</html>
